<?php
/**
 * 操作日志
 * @author Administrator
 *
 */
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class LogOperation extends Model
{
    protected $table = 'log_operation';
    
    protected function getDateFormat()
    {
    	return date(time());
    }
    /**
     * 插入操作日志
     * @param unknown_type $uid
     * @param unknown_type $type
     * @param unknown_type $content
     * @param unknown_type $clientid 客户端类型 2 app 1web 
     * @param unknown_type $source 1 后台 2前台
     */
    static function insertLog($uid,$type,$content,$clientid,$source){
    	$log = new LogOperation();
		$log->uid = $uid;
		$log->content = $content;
		$log->type = $type;
		$log->source = $source;
		$log->client_id=$clientid;
		$log->save();
    }
}
